package main1;

import java.util.Scanner;

class Employee{

    int getSalary(int salary){
        return salary;
    }

}

class Manager extends Employee{
    int getSalary(int salary){
        return salary;
    }
}

class Salesman extends Employee{
    int getSalary(int salary,int add){
        return salary + add;
    }
}

class Worker extends Employee{
    int getSalary(int days,int salary){
        return days * salary;
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int Msalary = reader.nextInt();
        int Ssalary = reader.nextInt();
        int add = reader.nextInt();
        int days = reader.nextInt();
        int Wsalary = reader.nextInt();

        Manager manager = new Manager();
        System.out.println(manager.getSalary(Msalary));

        Salesman salesman = new Salesman();
        System.out.println(salesman.getSalary(Ssalary,add));

        Worker worker = new Worker();
        System.out.println(worker.getSalary(days,Wsalary));

    }
}
